
package com.doc2video.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.doc2video.common.Result;
import com.doc2video.dto.VideoGenerateDTO;
import com.doc2video.entity.Video;

import javax.servlet.http.HttpServletRequest;

/**
 * 视频Service接口
 */
public interface VideoService extends IService<Video> {

    /**
     * 生成视频
     */
    Result<String> generateVideo(VideoGenerateDTO generateDTO, HttpServletRequest request);

    /**
     * 分页查询用户视频列表
     */
    Result<Page<Video>> getUserVideos(Page<Video> page, HttpServletRequest request);

    /**
     * 根据ID查询视频
     */
    Result<Video> getVideoById(Long id, HttpServletRequest request);

    /**
     * 下载视频
     */
    Result<byte[]> downloadVideo(Long id, HttpServletRequest request);

    /**
     * 删除视频
     */
    Result<String> deleteVideo(Long id, HttpServletRequest request);

    /**
     * 获取视频生成进度
     */
    Result<Integer> getVideoProgress(Long videoId, HttpServletRequest request);

    /**
     * 重新生成视频
     */
    Result<String> regenerateVideo(Long videoId, HttpServletRequest request);
}
